<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../plugins/echarts/echarts.js"></script>
</head>
<body>
    <div id="main" style="width: 600px;height:400px;"></div>

    <script type="text/javascript">
        var myChart = echarts.init(document.getElementById('line'));
    axios.get('/report/getGoodsNumInfo').then((res)=>{
        console.log(res.data.data);
        myChart.setOption( {
            angleAxis: {
                type: 'category',
                data: res.data.data.goodsName
            },
            radiusAxis: {},
            polar: {},
            series: [
                {
                    type: 'bar',
                    data: res.data.data.ct1,
                    coordinateSystem: 'polar',
                    name: 'MAC电脑',
                    stack: 'a',
                    emphasis: {
                        focus: 'series'
                    }
                },
                {
                    type: 'bar',
                    data: res.data.data.ct2,
                    coordinateSystem: 'polar',
                    name: '华为Max非凡大师',
                    stack: 'a',
                    emphasis: {
                        focus: 'series'
                    }
                },
                {
                    type: 'bar',
                    data: res.data.data.ct3,
                    coordinateSystem: 'polar',
                    name: '青岛大虾',
                    stack: 'a',
                    emphasis: {
                        focus: 'series'
                    }
                }
            ],
            legend: {
                show: true,
                data: ['MAC电脑','华为Max非凡大师','青岛大虾']
            }
        });
    });
    </script>
</body>
</html>